
<%@ page import="iceportal1.Login" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'login.label', default: 'Login')}" />
        <title><g:message code="default.portal.label" args="[session.type]" /></title>
    </head>
    <body>

        <div class="body">          
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${loginInstance}">
            <div class="errors">
                <g:renderErrors bean="${loginInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form name="loginform" action="authenticate" method="post" >
                <div class="dialog" style="width:30%">
                    <table>
                        <tbody>
                         
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="username"><g:message code="login.username.label" default="Username" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: loginInstance, field: 'username', 'errors')}">
                                    <g:textField name="username" value="${loginInstance?.username}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="password"><g:message code="login.password.label" default="Password" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: loginInstance, field: 'password', 'errors')}">
                                    <g:passwordField name="password" value="${loginInstance?.password}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons" style="width:30%">
                    <span class="button"><g:submitButton name="login" class="save" value="${message(code: 'default.button.login.label', default: 'Login')}" /></span>
                </div>
            </g:form>
        </div>
        <script language="JavaScript">
    	document.loginform.username.focus();
    </script>
    </body>
    
</html>
